cmake_minimum_required(VERSION 3.13)
project(base64tool VERSION 1.0.0 LANGUAGES C CXX)

# This project can use C11, but will gracefully decay down to C89.
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED OFF)
set(CMAKE_C_EXTENSIONS OFF)

# This project requires C++11.
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")

add_definitions(/W4)
add_definitions(-DWIN32_LEAN_AND_MEAN)
add_definitions(-DUNICODE -D_UNICODE)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)

add_executable(base64 "")

aux_source_directory(${PROJECT_SOURCE_DIR}/utils/base64 BASE64_SRC)
aux_source_directory(${PROJECT_SOURCE_DIR}/utils UTILS_SRC)
aux_source_directory(${PROJECT_SOURCE_DIR}/src APP_SRC)

target_sources(base64
PRIVATE
    ${BASE64_SRC}
    ${UTILS_SRC}
    ${APP_SRC}
    ${PROJECT_SOURCE_DIR}/res/base64tool.rc
)

target_include_directories(base64
PRIVATE
    ${PROJECT_SOURCE_DIR}
)
